#pragma once

#include "Defines.h"
#include "CustomEventReceiver.h"
#include "EventTypes.h"
#include <stdint.h>
#include <vector>
#include "WorldObject.h"
#include "AttackObject.h"
#include <iostream>

#ifdef _WIN32
#include <windows.h>
#endif

class EventHandler
{
	private:
		CustomEventReceiver eventReceiver;
	public:
		CustomEventReceiver* getEventReceiver();
		EventHandler();
		void handleEvents();
		bool handleCollisionEvent(WorldObject* object1, WorldObject* object2, bool* object1Removed); //TODO: remove object1Removed and have this func not call removeWorldObject on objects such as attacks so that a attack may collide with several objects the same engine iteration 
	private:
		void handleMouseEvents();
		void handleKeyEvents();

		void handleAttackCollision(AttackObject* attack, WorldObject*target, bool* attackRemoved);

};

extern EventHandler globalEventHandler;
